package com.liutaw.nanjingair.views.fragments;

import android.support.v4.app.Fragment;

import com.liutaw.nanjingair.dagger.HasComponent;

/**
 * Created by liutao on 16/3/16.
 */
public class BaseFragment extends Fragment {

    protected <C> C getComponent(Class<C> componentType) {
        return componentType.cast(((HasComponent<C>) getActivity()).getComponent());
    }
}
